function addToList(item) {
    console.log(item);
    var str="<div class=\"weui-cell weui-cell_swiped item\" fromAccount="+item.fromAccount+">" +
        "<div class=\"weui-cell__bd\">" +
        "<div class=\"weui-cell\">" +
        "<div class=\"weui-cell__hd\">" +
        "<img src="+item.url+" alt=\"\" style=\"width:50px;height:50px;margin-right:20px;display:block\">" +
        "</div>" +
        "<div class=\"weui-cell__bd\">" +
        "<h3><strong>"+item.fromAccountNick+"</strong></h3>" +
        "<p>"+item.content+"</p>" +
        "</div>" +
        "<div class=\"weui-cell__ft\">" +
        "<p>"+item.time+"</p>" +
        "<span class='weui-badge num' style='position: absolute;top: 0.4em;right: 0.4em;'>1</span>"+
        "</div>" +
        "</div>" +
        "</div>" +
        "<div class=\"weui-cell__ft\">" +
        "<a class=\"weui-swiped-btn weui-swiped-btn_warn delete-swipeout\" href=\"javascript:\">删除</a>" +
        "<a class=\"weui-swiped-btn weui-swiped-btn_default close-swipeout\" href=\"javascript:\">关闭</a>" +
        "</div>" +
        "</div>";
    var exits=false;
    $(".weui-cell_swiped").each(function (i, e) {
        if($(this).attr("fromAccount")==item.fromAccount){
            exits=true;
            if($(this).find(".num").length>0){
                var num=parseInt($(this).find(".num").text());
                num=num+1;
                $(this).find(".num").text(num);
            }
        }
    });
    if(!exits){
        $("#list").prepend(str);
        $('.weui-cell_swiped').swipeout();
        $('.delete-swipeout').on("click",function (e) {
            $(this).parents(".weui-cell_swiped").remove();
        });
        $('.close-swipeout').on("click",function (e) {
            $('.weui-cell_swiped').swipeout("close");
        });
        $(".item").on("click",function (e) {
            showMsg({
                account:$(this).attr("fromAccount"),
                nickname:$(this).find("h3").text()
            });
            var msg="<div><img src='"+item.url+"' style='width: 50px;height: 50px;display: inline-block'><h3 style='display: inline-block'>"+item.fromAccountNick+":</h3><p>"+item.content+"</p></div>";
            $("#main").append(msg);
        });
    }

}